package gui.programchair;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Observable;
import java.util.Observer;

import javax.swing.JButton;
import javax.swing.JPanel;

import gui.CAFrame;

/**
 * Program Chair South Panel
 * @author tbnetzer
 * @version 12/3/2011
 */
public class pcSouthPanel extends JPanel implements Observer{

	 /**
	  * Parent Frame
	  */
	 private final CAFrame my_parent;
	 
	 private final JButton my_mainMenuButton
	 	= new JButton("Main Menu");
	 
	 public pcSouthPanel(final CAFrame parentFrame) {
		  my_parent = parentFrame;
		  
		  setup();
	 }
		
	 /**
	  * Panel Setup Method
	  */
	 private void setup() {
		 setLayout(new FlowLayout(FlowLayout.CENTER));
		 
		// Main Menu Button
			my_mainMenuButton.addActionListener(new ActionListener() 
			{
				public void actionPerformed(final ActionEvent event) 
				{
					my_parent.displayWelcome();
				}
			});
			
			add(my_mainMenuButton);
	 }

	@Override
	public void update(Observable o, Object arg) {
		// TODO Auto-generated method stub
		
	}
}
